package test.comparable_comparator.bean;

import test.comparable_comparator.bean.Apple;

import java.util.Comparator;

/**
 * Created by linshuo on 2018/4/11.
 */
public class AppleComparator implements Comparator<Apple> {

    @Override
    public int compare(Apple o1, Apple o2) {
        return o1.getAge() - o2.getAge();
    }
}
